from import_export import resources
from .models import UserProfile

class UserProfileResource(resources.ModelResource):

    class Meta:
        model = UserProfile
        import_id_fields = ['username', 'password'] # 这里决定了update_or_create，可以避免重复导入
